package com.teach_sys.service;

import com.teach_sys.bean.Course;
import com.teach_sys.dao.CourseDao;

import java.util.List;

public class CourseService {
    private final CourseDao courseDao = new CourseDao();

    public void addCourse(Course course) {
        courseDao.addCourse(course);
    }

    public void deleteCourseByCno(String cno) {
        courseDao.deleteCourseByCno(cno);
    }

    public void updateCourse(Course course) {
        courseDao.updateCourse(course);
    }

    public List<Course> queryCourseByCno(String cno) {
        return courseDao.queryCourseByCno(cno);
    }

    public List<Course> queryCourseByCname(String cname) {
        return courseDao.queryCourseByCname(cname);
    }

    public List<Course> queryAllCourse() {
        return courseDao.queryAllCourse();
    }
}
